﻿using System;
using System.Collections.Generic;

namespace AppMain
{

    //位移 击退 方向类型
    public enum E_DirType
    {
        Back = 1,
        Forward,
        Caster2Target,
        HitAir,
    }
    //被抓取的时候 高度以谁为原点
    public enum E_GrabPosType
    {
        CasterSpace = 1,
        WorldSpace,
    }

    public enum Move_Status
    {
        HitAuto = 1,
        HitBack,
        HitCurve,
        SelfMove,
        SelfJump,
        SelfRun,
        SelfStand,

        Rebound = 100,
    }

    public enum RoleMove_Status
    {
        None,
        Stand = 1,
        Run,
        HitBack,
        HitCurve,
        LieDown,
        LieUp,
        JumpUp,
        JumpFall,
        SelfMove,
        HitCurveRebound,
    }

    public struct MoveData
    {
        public Move_Status moveStatus;
        public float distance;
        public float height;
        public Vec3 dir;
        public float speed;
        public int status;
        public float time;

        public static MoveData New()
        {
            MoveData data = new MoveData();
            data.moveStatus = Move_Status.SelfStand;
            data.distance = 0;
            data.height = 0;
            data.dir = Vec3.zero;
            data.speed = 0;
            data.status = 0;
            data.time = 0;
            return data;
        }
    }

    /// <summary>
    /// 位移
    /// 
    /// </summary>
    public interface IMoveWidget
    {
        void initialize(BoxRole role);

        void doMove(MoveData moveData);
        void forceTo(RoleMove_Status status);
        void forceTo(RoleMove_Status status, MoveData moveData);
        RoleMove_Status getRoleMoveStatus();

        void input(float x, float z);
        void input(float value);

        void tick(float frameTime);
    }
}
